package dao.impl;

import dao.ConvertRateDao;
import domain.ConvertRate;
import domain.ProvinceTop3;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import util.JDBCUtils;

import java.util.List;

public class ConvertRateDaoImpl implements ConvertRateDao {
    private JdbcTemplate template = new JdbcTemplate(JDBCUtils.getDataSource());
    @Override
    public List<ConvertRate> SelectConvertRate(String taskid) {
        String sql = "SELECT taskid,convertRate FROM page_split_convert WHERE taskid = '"+taskid+"'";
        List<ConvertRate> query = template.query(sql, new BeanPropertyRowMapper<ConvertRate>(ConvertRate.class));
        return query;
    }
}
